#include <iostream>
#include <stdlib.h>
#include <list>
#include <vector>
#include <stdio.h>
#include <fstream>
#include <math.h>
#include "semanticValidationStructures.h"


int main(){
	constVariableTable constTable = constVariableTable::constVariableTable(BASE_CONST,CONST_JUNK_SIZE);
	constTable.reconstructConstTable();
	
	memory constMem = memory::memory();
	constMem.intMemory = constTable.getConstVectorInt();
	constMem.floatMemory = constTable.getConstVectorFloat();
	constMem.booleanMemory = constTable.getConstVectorBool();
	constMem.charMemory = constTable.getConstVectorChar();
	
	intermediateCode cuadruplosVector;
	cuadruplo currentCuadruplo;
	cuadruplosVector.reconstructCuadruplosVector();
	cuadruplosVector.initIterator();
	int cuadruploCounter = 1, memoryCounter = 1, gotoFlag;
	currentCuadruplo = cuadruplosVector.getThisCuadruplo(cuadruploCounter);
	
	int iOp1, iOp2;
	float fOp1, fOp2; 
	bool bOp1, bOp2;
	char cOp1, cOp2;

	stack<int> jumpBack;
	
	vector<memory*> memoryIndex;
	vector<memory*>::iterator itMemIndex;
	itMemIndex = memoryIndex.begin();
	
	memory tmpMem = memory::memory();
	memory *tmpPtr;
	
	double param, fractpart, intpart, rest;
	
	while(currentCuadruplo.id != -1){
		gotoFlag = 0;
		string active;
		bool res;
	
		switch(currentCuadruplo.oper){

			///////
			//MAS//
			///////
			case 0: 
				//cout << "suma de " << currentCuadruplo.op1 << " y " << currentCuadruplo.op2 << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){ 
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE)
						fOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE)
						fOp1 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}
				
				if(currentCuadruplo.op2 >= BASE_TEMP && currentCuadruplo.op2 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp2 = tmpMem.intMemory[currentCuadruplo.op2-BASE_TEMP];
					if(currentCuadruplo.op2 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp2 = tmpMem.floatMemory[currentCuadruplo.op2-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_CONST && currentCuadruplo.op2 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_CONST+CONST_JUNK_SIZE) 
						fOp2 = constMem.intMemory[currentCuadruplo.op2-BASE_CONST];
					if(currentCuadruplo.op2 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp2 = constMem.floatMemory[currentCuadruplo.op2-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_MEM){
					param = (currentCuadruplo.op2-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op2-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					//cout << intpart << " " << rest << endl;
					if(rest < MEM_JUNK_SIZE)
						fOp2 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp2 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}

				//cout << "operando 1 " << fOp1 << endl;
				//cout << "operando 2 " << fOp2 << endl;
				
				if(currentCuadruplo.result < BASE_TEMP+TEMP_JUNK_SIZE){
					tmpMem.itInt = tmpMem.intMemory.begin() + currentCuadruplo.result-BASE_TEMP;
					tmpMem.intMemory.insert(tmpMem.itInt,fOp1+fOp2);
					//cout << "resultado " << tmpMem.intMemory[currentCuadruplo.result-BASE_TEMP] << endl;
				}
				if(currentCuadruplo.result >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.result < BASE_TEMP+2*TEMP_JUNK_SIZE){
					tmpMem.itFloat = tmpMem.floatMemory.begin() + currentCuadruplo.result-(BASE_TEMP+TEMP_JUNK_SIZE);
					tmpMem.floatMemory.insert(tmpMem.itFloat,fOp1+fOp2);
					//cout << "resultado " << tmpMem.floatMemory[currentCuadruplo.result-(BASE_TEMP+TEMP_JUNK_SIZE)] << endl;
				}
				break;
				
			/////////
			//MENOS//
			/////////
			case 1:
				//cout << "resta de " << currentCuadruplo.op1 << " y " << currentCuadruplo.op2 << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){ 
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE)
						fOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE)
						fOp1 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}
				
				if(currentCuadruplo.op2 >= BASE_TEMP && currentCuadruplo.op2 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp2 = tmpMem.intMemory[currentCuadruplo.op2-BASE_TEMP];
					if(currentCuadruplo.op2 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp2 = tmpMem.floatMemory[currentCuadruplo.op2-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_CONST && currentCuadruplo.op2 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_CONST+CONST_JUNK_SIZE) 
						fOp2 = constMem.intMemory[currentCuadruplo.op2-BASE_CONST];
					if(currentCuadruplo.op2 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp2 = constMem.floatMemory[currentCuadruplo.op2-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_MEM){
					param = (currentCuadruplo.op2-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op2-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					//cout << intpart << " " << rest << endl;
					if(rest < MEM_JUNK_SIZE)
						fOp2 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp2 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}

				//cout << "operando 1 " << fOp1 << endl;
				//cout << "operando 2 " << fOp2 << endl;
				
				if(currentCuadruplo.result < BASE_TEMP+TEMP_JUNK_SIZE){
					tmpMem.itInt = tmpMem.intMemory.begin() + currentCuadruplo.result-BASE_TEMP;
					tmpMem.intMemory.insert(tmpMem.itInt,fOp1-fOp2);
					//cout << "resultado " << tmpMem.intMemory[currentCuadruplo.result-BASE_TEMP] << endl;
				}
				if(currentCuadruplo.result >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.result < BASE_TEMP+2*TEMP_JUNK_SIZE){
					tmpMem.itFloat = tmpMem.floatMemory.begin() + currentCuadruplo.result-(BASE_TEMP+TEMP_JUNK_SIZE);
					tmpMem.floatMemory.insert(tmpMem.itFloat,fOp1-fOp2);
					//cout << "resultado " << tmpMem.floatMemory[currentCuadruplo.result-(BASE_TEMP+TEMP_JUNK_SIZE)] << endl;
				}
				break;
				
			//////////////////
			//MULTIPLICACION//
			//////////////////	
			case 2:
				//cout << "multiplicacion de " << currentCuadruplo.op1 << " y " << currentCuadruplo.op2 << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE)
						fOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE)
						fOp1 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}
				
				if(currentCuadruplo.op2 >= BASE_TEMP && currentCuadruplo.op2 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp2 = tmpMem.intMemory[currentCuadruplo.op2-BASE_TEMP];
					if(currentCuadruplo.op2 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp2 = tmpMem.floatMemory[currentCuadruplo.op2-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_CONST && currentCuadruplo.op2 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_CONST+CONST_JUNK_SIZE) 
						fOp2 = constMem.intMemory[currentCuadruplo.op2-BASE_CONST];
					if(currentCuadruplo.op2 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp2 = constMem.floatMemory[currentCuadruplo.op2-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_MEM){
					param = (currentCuadruplo.op2-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op2-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					//cout << intpart << " " << rest << endl;
					if(rest < MEM_JUNK_SIZE)
						fOp2 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp2 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}

				//cout << "operando 1 " << fOp1 << endl;
				//cout << "operando 2 " << fOp2 << endl;
				
				if(currentCuadruplo.result < BASE_TEMP+TEMP_JUNK_SIZE){
					tmpMem.itInt = tmpMem.intMemory.begin() + currentCuadruplo.result-BASE_TEMP;
					tmpMem.intMemory.insert(tmpMem.itInt,fOp1*fOp2);
					//cout << "resultado " << tmpMem.intMemory[currentCuadruplo.result-BASE_TEMP] << endl;
				}
				if(currentCuadruplo.result >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.result < BASE_TEMP+2*TEMP_JUNK_SIZE){
					tmpMem.itFloat = tmpMem.floatMemory.begin() + currentCuadruplo.result-(BASE_TEMP+TEMP_JUNK_SIZE);
					tmpMem.floatMemory.insert(tmpMem.itFloat,fOp1*fOp2);
					//cout << "resultado " << tmpMem.floatMemory[currentCuadruplo.result-(BASE_TEMP+TEMP_JUNK_SIZE)] << endl;
				}
				break;
				
			////////////
			//DIVISION//
			////////////	
			case 3:
				//cout << "division de " << currentCuadruplo.op1 << " y " << currentCuadruplo.op2 << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){  
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE)
						fOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE)
						fOp1 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}
				
				if(currentCuadruplo.op2 >= BASE_TEMP && currentCuadruplo.op2 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp2 = tmpMem.intMemory[currentCuadruplo.op2-BASE_TEMP];
					if(currentCuadruplo.op2 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp2 = tmpMem.floatMemory[currentCuadruplo.op2-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_CONST && currentCuadruplo.op2 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_CONST+CONST_JUNK_SIZE) 
						fOp2 = constMem.intMemory[currentCuadruplo.op2-BASE_CONST];
					if(currentCuadruplo.op2 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp2 = constMem.floatMemory[currentCuadruplo.op2-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_MEM){
					param = (currentCuadruplo.op2-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op2-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					//cout << intpart << " " << rest << endl;
					if(rest < MEM_JUNK_SIZE)
						fOp2 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp2 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}

				//cout << "operando 1 " << fOp1 << endl;
				//cout << "operando 2 " << fOp2 << endl;
				
				if(currentCuadruplo.result < BASE_TEMP+TEMP_JUNK_SIZE){
					tmpMem.itInt = tmpMem.intMemory.begin() + currentCuadruplo.result-BASE_TEMP;
					tmpMem.intMemory.insert(tmpMem.itInt,fOp1/fOp2);
					//cout << "resultado " << tmpMem.intMemory[currentCuadruplo.result-BASE_TEMP] << endl;
				}
				if(currentCuadruplo.result >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.result < BASE_TEMP+2*TEMP_JUNK_SIZE){
					tmpMem.itFloat = tmpMem.floatMemory.begin() + currentCuadruplo.result-(BASE_TEMP+TEMP_JUNK_SIZE);
					tmpMem.floatMemory.insert(tmpMem.itFloat,fOp1/fOp2);
					//cout << "resultado " << tmpMem.floatMemory[currentCuadruplo.result-(BASE_TEMP+TEMP_JUNK_SIZE)] << endl;
				}
				break;
				
			/////////////
			//MAYOR QUE//
			/////////////				
			case 4:
				//cout << "comparando " << currentCuadruplo.op1 << " > " << currentCuadruplo.op2 << endl;
				//cout << "dejando el resultado en " << currentCuadruplo.result << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){ 
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE)
						fOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE)
						fOp1 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}
				
				if(currentCuadruplo.op2 >= BASE_TEMP && currentCuadruplo.op2 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp2 = tmpMem.intMemory[currentCuadruplo.op2-BASE_TEMP];
					if(currentCuadruplo.op2 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp2 = tmpMem.floatMemory[currentCuadruplo.op2-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_CONST && currentCuadruplo.op2 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_CONST+CONST_JUNK_SIZE) 
						fOp2 = constMem.intMemory[currentCuadruplo.op2-BASE_CONST];
					if(currentCuadruplo.op2 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp2 = constMem.floatMemory[currentCuadruplo.op2-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_MEM){
					param = (currentCuadruplo.op2-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op2-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					//cout << intpart << " " << rest << endl;
					if(rest < MEM_JUNK_SIZE)
						fOp2 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp2 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}

				//cout << "operando 1 " << fOp1 << endl;
				//cout << "operando 2 " << fOp2 << endl;				
				
				if(fOp1 > fOp2)
					res=true;
				
				else					
					res=false;

				tmpMem.itBool = tmpMem.booleanMemory.begin() + currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE);
				tmpMem.booleanMemory.insert(tmpMem.itBool,res);
				//cout << "resultado " << tmpMem.booleanMemory[currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE)] << endl;
				
				break;
				
			/////////////
			//MENOR QUE//
			/////////////				
			case 5:
				//cout << "comparando " << currentCuadruplo.op1 << " < " << currentCuadruplo.op2 << endl;
				//cout << "dejando el resultado en " << currentCuadruplo.result << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){ 
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE)
						fOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE)
						fOp1 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}
				
				if(currentCuadruplo.op2 >= BASE_TEMP && currentCuadruplo.op2 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp2 = tmpMem.intMemory[currentCuadruplo.op2-BASE_TEMP];
					if(currentCuadruplo.op2 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp2 = tmpMem.floatMemory[currentCuadruplo.op2-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_CONST && currentCuadruplo.op2 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_CONST+CONST_JUNK_SIZE) 
						fOp2 = constMem.intMemory[currentCuadruplo.op2-BASE_CONST];
					if(currentCuadruplo.op2 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp2 = constMem.floatMemory[currentCuadruplo.op2-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_MEM){
					param = (currentCuadruplo.op2-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op2-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					//cout << intpart << " " << rest << endl;
					if(rest < MEM_JUNK_SIZE)
						fOp2 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp2 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}

				//cout << "operando 1 " << fOp1 << endl;
				//cout << "operando 2 " << fOp2 << endl;				
				
				if(fOp1 < fOp2) res=true;
				else res=false;
				
				tmpMem.itBool = tmpMem.booleanMemory.begin() + currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE);
				tmpMem.booleanMemory.insert(tmpMem.itBool,res);
				//cout << "resultado " << tmpMem.booleanMemory[currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE)] << endl;
				break;
				
			/////////////
			//DISTINTOS//
			/////////////				
			case 6:
				//cout << "comparando " << currentCuadruplo.op1 << " != " << currentCuadruplo.op2 << endl;
				//cout << "dejando el resultado en " << currentCuadruplo.result << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE){
						iOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
						active = "int";
					}
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE){
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
						active = "float";
					}
					 if(currentCuadruplo.op1 >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+3*TEMP_JUNK_SIZE){
						bOp1 = tmpMem.booleanMemory[currentCuadruplo.op1-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
						 active = "bool";
					 }
					 if(currentCuadruplo.op1 >= BASE_TEMP+3*TEMP_JUNK_SIZE){
						cOp1 = tmpMem.charMemory[currentCuadruplo.op1-(BASE_TEMP+3*TEMP_JUNK_SIZE)];
						active = "char";
					 }
				}
				 
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE){
						iOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
						active = "int";
					}
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE){
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
						active = "float";
					}
					if(currentCuadruplo.op1 >= BASE_CONST+2*CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+3*CONST_JUNK_SIZE){
						bOp1 = constMem.booleanMemory[currentCuadruplo.op1-(BASE_CONST+2*CONST_JUNK_SIZE)];
						active = "bool";
					}
					if(currentCuadruplo.op1 >= BASE_CONST+3*CONST_JUNK_SIZE){
						cOp1 = constMem.charMemory[currentCuadruplo.op1-(BASE_CONST+3*CONST_JUNK_SIZE)];
						active = "char";
					}
				}
				 
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE){
						iOp1 = tmpPtr->intMemory[rest];
						active = "int";
					}
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE){
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
						active = "float";
					}
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE){
						bOp1 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
						active = "bool";
					}
					if(rest >= 3*MEM_JUNK_SIZE && rest < 4*MEM_JUNK_SIZE){
						cOp1 = tmpPtr->charMemory[rest-3*MEM_JUNK_SIZE];
						active = "char";
					}
				}
			
				
				if(currentCuadruplo.op2 >= BASE_TEMP && currentCuadruplo.op2 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_TEMP+TEMP_JUNK_SIZE)
						iOp2 = tmpMem.intMemory[currentCuadruplo.op2-BASE_TEMP];
					if(currentCuadruplo.op2 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp2 = tmpMem.floatMemory[currentCuadruplo.op2-(BASE_TEMP+TEMP_JUNK_SIZE)];
					 if(currentCuadruplo.op2 >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+3*TEMP_JUNK_SIZE)
						bOp2 = tmpMem.booleanMemory[currentCuadruplo.op2-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
					 if(currentCuadruplo.op2 >= BASE_TEMP+3*TEMP_JUNK_SIZE)
						cOp2 = tmpMem.charMemory[currentCuadruplo.op2-(BASE_TEMP+3*TEMP_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op2 >= BASE_CONST && currentCuadruplo.op2 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_CONST+CONST_JUNK_SIZE)
						iOp2 = constMem.intMemory[currentCuadruplo.op2-BASE_CONST];
					if(currentCuadruplo.op2 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp2 = constMem.floatMemory[currentCuadruplo.op2-(BASE_CONST+CONST_JUNK_SIZE)];
					if(currentCuadruplo.op2 >= BASE_CONST+2*CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+3*CONST_JUNK_SIZE)
						bOp2 = constMem.booleanMemory[currentCuadruplo.op2-(BASE_CONST+2*CONST_JUNK_SIZE)];
					if(currentCuadruplo.op2 >= BASE_CONST+3*CONST_JUNK_SIZE)
						cOp2 = constMem.charMemory[currentCuadruplo.op2-(BASE_CONST+3*CONST_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op2 >= BASE_MEM){
					param = (currentCuadruplo.op2-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op2-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE)
						iOp2 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp2 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE)
						bOp2 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
					if(rest >= 3*MEM_JUNK_SIZE && rest < 4*MEM_JUNK_SIZE)
						cOp2 = tmpPtr->charMemory[rest-3*MEM_JUNK_SIZE];
				}
					
				if(active == "int"){
					//cout << "operando 1 " << iOp1 << endl;
					//cout << "operando 2 " << iOp2 << endl;
					if(iOp1 != iOp2) res=true;
					else res=false;
				}
				if(active == "float"){
					//cout << "operando 1 " << fOp1 << endl;
					//cout << "operando 2 " << fOp2 << endl;
					if(fOp1 != fOp2) res=true;
					else res=false;
				}
				if(active == "bool"){
					//cout << "operando 1 " << bOp1 << endl;
					//cout << "operando 2 " << bOp2 << endl;
					if(bOp1 != bOp2) res=true;
					else res=false;
				}
				if(active == "char"){
					//cout << "operando 1 " << cOp1 << endl;
					//cout << "operando 2 " << cOp2 << endl;
					if(cOp1 != cOp2) res=true;
					else res=false;
				}
				tmpMem.itBool = tmpMem.booleanMemory.begin() + currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE);
				tmpMem.booleanMemory.insert(tmpMem.itBool,res);
				//cout << "resultado " << tmpMem.booleanMemory[currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE)] << endl;
				break;
				
			///////////////////
			//MENOR IGUAL QUE//
			///////////////////				
			case 7: // :<
				//cout << "comparando " << currentCuadruplo.op1 << " <= " << currentCuadruplo.op2 << endl;
				//cout << "dejando el resultado en " << currentCuadruplo.result << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){ 
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE)
						fOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE)
						fOp1 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}
				
				if(currentCuadruplo.op2 >= BASE_TEMP && currentCuadruplo.op2 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp2 = tmpMem.intMemory[currentCuadruplo.op2-BASE_TEMP];
					if(currentCuadruplo.op2 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp2 = tmpMem.floatMemory[currentCuadruplo.op2-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_CONST && currentCuadruplo.op2 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_CONST+CONST_JUNK_SIZE) 
						fOp2 = constMem.intMemory[currentCuadruplo.op2-BASE_CONST];
					if(currentCuadruplo.op2 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp2 = constMem.floatMemory[currentCuadruplo.op2-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_MEM){
					param = (currentCuadruplo.op2-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op2-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					//cout << intpart << " " << rest << endl;
					if(rest < MEM_JUNK_SIZE)
						fOp2 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp2 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}

				//cout << "operando 1 " << fOp1 << endl;
				//cout << "operando 2 " << fOp2 << endl;		
				
				if(fOp1 <= fOp2) res=true;
				else res=false;
				
				tmpMem.itBool = tmpMem.booleanMemory.begin() + currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE);
				tmpMem.booleanMemory.insert(tmpMem.itBool,res);
				//cout << "resultado " << tmpMem.booleanMemory[currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE)] << endl;
					
				break;
				
			///////////////////
			//MAYOR IGUAL QUE//
			///////////////////								
			case 8: // :>
				//cout << "comparando " << currentCuadruplo.op1 << " >= " << currentCuadruplo.op2 << endl;
				//cout << "dejando el resultado en " << currentCuadruplo.result << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){ 
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE)
						fOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE)
						fOp1 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}
				
				if(currentCuadruplo.op2 >= BASE_TEMP && currentCuadruplo.op2 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp2 = tmpMem.intMemory[currentCuadruplo.op2-BASE_TEMP];
					if(currentCuadruplo.op2 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp2 = tmpMem.floatMemory[currentCuadruplo.op2-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_CONST && currentCuadruplo.op2 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_CONST+CONST_JUNK_SIZE) 
						fOp2 = constMem.intMemory[currentCuadruplo.op2-BASE_CONST];
					if(currentCuadruplo.op2 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp2 = constMem.floatMemory[currentCuadruplo.op2-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_MEM){
					param = (currentCuadruplo.op2-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op2-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					//cout << intpart << " " << rest << endl;
					if(rest < MEM_JUNK_SIZE)
						fOp2 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp2 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}

				//cout << "operando 1 " << fOp1 << endl;
				//cout << "operando 2 " << fOp2 << endl;						
				
				if(fOp1 >= fOp2) res=true;
				else res=false;
				
				tmpMem.itBool = tmpMem.booleanMemory.begin() + currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE);
				tmpMem.booleanMemory.insert(tmpMem.itBool,res);
				//cout << "resultado " << tmpMem.booleanMemory[currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE)] << endl;
					
				break;
				
			///////////////
			//COMPARACION//
			///////////////								
			case 9: // ==
				//cout << "comparando " << currentCuadruplo.op1 << " == " << currentCuadruplo.op2 << endl;
				//cout << "dejando el resultado en " << currentCuadruplo.result << endl;	

				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE){
						fOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
						active = "int";
					}
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE){
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
						active = "float";
					}
					 if(currentCuadruplo.op1 >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+3*TEMP_JUNK_SIZE){
						bOp1 = tmpMem.booleanMemory[currentCuadruplo.op1-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
						 active = "bool";
					 }
					 if(currentCuadruplo.op1 >= BASE_TEMP+3*TEMP_JUNK_SIZE){
						cOp1 = tmpMem.charMemory[currentCuadruplo.op1-(BASE_TEMP+3*TEMP_JUNK_SIZE)];
						active = "char";
					 }
				}

				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE){
						fOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
						active = "int";
					}
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE){
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
						active = "float";
					}
					if(currentCuadruplo.op1 >= BASE_CONST+2*CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+3*CONST_JUNK_SIZE){
						bOp1 = constMem.booleanMemory[currentCuadruplo.op1-(BASE_CONST+2*CONST_JUNK_SIZE)];
						active = "bool";
					}
					if(currentCuadruplo.op1 >= BASE_CONST+3*CONST_JUNK_SIZE){
						cOp1 = constMem.charMemory[currentCuadruplo.op1-(BASE_CONST+3*CONST_JUNK_SIZE)];
						active = "char";
					}
				}

				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE){
						fOp1 = tmpPtr->intMemory[rest];
						active = "int";
					}
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE){
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
						active = "float";
					}
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE){
						bOp1 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
						active = "bool";
					}
					if(rest >= 3*MEM_JUNK_SIZE && rest < 4*MEM_JUNK_SIZE){
						cOp1 = tmpPtr->charMemory[rest-3*MEM_JUNK_SIZE];
						active = "char";
					}
				}
			

				if(currentCuadruplo.op2 >= BASE_TEMP && currentCuadruplo.op2 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp2 = tmpMem.intMemory[currentCuadruplo.op2-BASE_TEMP];
					if(currentCuadruplo.op2 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp2 = tmpMem.floatMemory[currentCuadruplo.op2-(BASE_TEMP+TEMP_JUNK_SIZE)];
					 if(currentCuadruplo.op2 >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+3*TEMP_JUNK_SIZE)
						bOp2 = tmpMem.booleanMemory[currentCuadruplo.op2-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
					 if(currentCuadruplo.op2 >= BASE_TEMP+3*TEMP_JUNK_SIZE)
						cOp2 = tmpMem.charMemory[currentCuadruplo.op2-(BASE_TEMP+3*TEMP_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_CONST && currentCuadruplo.op2 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op2 < BASE_CONST+CONST_JUNK_SIZE)
						fOp2 = constMem.intMemory[currentCuadruplo.op2-BASE_CONST];
					if(currentCuadruplo.op2 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp2 = constMem.floatMemory[currentCuadruplo.op2-(BASE_CONST+CONST_JUNK_SIZE)];
					if(currentCuadruplo.op2 >= BASE_CONST+2*CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+3*CONST_JUNK_SIZE)
						bOp2 = constMem.booleanMemory[currentCuadruplo.op2-(BASE_CONST+2*CONST_JUNK_SIZE)];
					if(currentCuadruplo.op2 >= BASE_CONST+3*CONST_JUNK_SIZE)
						cOp2 = constMem.charMemory[currentCuadruplo.op2-(BASE_CONST+3*CONST_JUNK_SIZE)];
				}
				if(currentCuadruplo.op2 >= BASE_MEM){
					param = (currentCuadruplo.op2-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op2-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE)
						fOp2 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp2 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE)
						bOp2 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
					if(rest >= 3*MEM_JUNK_SIZE && rest < 4*MEM_JUNK_SIZE)
						cOp2 = tmpPtr->charMemory[rest-3*MEM_JUNK_SIZE];
				}
				if(active == "int"){
					//cout << "operando 1 " << fOp1 << endl;
					//cout << "operando 2 " << fOp2 << endl;				
					if(fOp1 == fOp2) res=true;
					else res=false;
				}
				if(active == "float"){
					//cout << "operando 1 " << fOp1 << endl;
					//cout << "operando 2 " << fOp2 << endl;
					if(fOp1 == fOp2) res=true;
					else res=false;
				}
				if(active == "bool"){
					//cout << "operando 1 " << bOp1 << endl;
					//cout << "operando 2 " << bOp2 << endl;
					if(bOp1 == bOp2) res=true;
					else res=false;
				}
				if(active == "char"){
					//cout << "operando 1 " << cOp1 << endl;
					//cout << "operando 2 " << cOp2 << endl;
					if(cOp1 == cOp2) res=true;
					else res=false;
				}
				tmpMem.itBool = tmpMem.booleanMemory.begin() + currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE);
				tmpMem.booleanMemory.insert(tmpMem.itBool,res);
				//cout << "resultado " << tmpMem.booleanMemory[currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE)] << endl;
				break;
				
			///////
			//AND//
			///////
			case 10:
				//cout << currentCuadruplo.op1 << " AND " << currentCuadruplo.op2 << endl;
				//cout << "dejando el resultado en " << currentCuadruplo.result << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					 if(currentCuadruplo.op1 >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+3*TEMP_JUNK_SIZE)
						bOp1 = tmpMem.booleanMemory[currentCuadruplo.op1-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op1 >= BASE_CONST+2*CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+3*CONST_JUNK_SIZE)
						bOp1 = constMem.booleanMemory[currentCuadruplo.op1-(BASE_CONST+2*CONST_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE)
						bOp1 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
				}
				
				if(currentCuadruplo.op2 >= BASE_TEMP && currentCuadruplo.op2 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					 if(currentCuadruplo.op2 >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+3*TEMP_JUNK_SIZE)
						bOp2 = tmpMem.booleanMemory[currentCuadruplo.op2-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op2 >= BASE_CONST && currentCuadruplo.op2 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op2 >= BASE_CONST+2*CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+3*CONST_JUNK_SIZE)
						bOp2 = constMem.booleanMemory[currentCuadruplo.op2-(BASE_CONST+2*CONST_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op2 >= BASE_MEM){
					param = (currentCuadruplo.op2-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op2-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE)
						bOp2 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
				}
				
				//cout << "operando 1 " << bOp1 << endl;
				//cout << "operando 2 " << bOp2 << endl;
				
				tmpMem.itBool = tmpMem.booleanMemory.begin() + currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE);
				tmpMem.booleanMemory.insert(tmpMem.itBool,res);
				//cout << "resultado " << tmpMem.booleanMemory[currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE)] << endl;
				
				break;
				
			//////
			//OR//
			//////
			case 11:
				//cout << currentCuadruplo.op1 << " OR " << currentCuadruplo.op2 << endl;
				//cout << "dejando el resultado en " << currentCuadruplo.result << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					 if(currentCuadruplo.op1 >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+3*TEMP_JUNK_SIZE)
						bOp1 = tmpMem.booleanMemory[currentCuadruplo.op1-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op1 >= BASE_CONST+2*CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+3*CONST_JUNK_SIZE)
						bOp1 = constMem.booleanMemory[currentCuadruplo.op1-(BASE_CONST+2*CONST_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE)
						bOp1 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
				}
				
				if(currentCuadruplo.op2 >= BASE_TEMP && currentCuadruplo.op2 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					 if(currentCuadruplo.op2 >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.op2 < BASE_TEMP+3*TEMP_JUNK_SIZE)
						bOp2 = tmpMem.booleanMemory[currentCuadruplo.op2-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op2 >= BASE_CONST && currentCuadruplo.op2 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op2 >= BASE_CONST+2*CONST_JUNK_SIZE && currentCuadruplo.op2 < BASE_CONST+3*CONST_JUNK_SIZE)
						bOp2 = constMem.booleanMemory[currentCuadruplo.op2-(BASE_CONST+2*CONST_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op2 >= BASE_MEM){
					param = (currentCuadruplo.op2-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op2-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE)
						bOp2 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
				}
				
				//cout << "operando 1 " << bOp1 << endl;
				//cout << "operando 2 " << bOp2 << endl;
				
				tmpMem.itBool = tmpMem.booleanMemory.begin() + currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE);
				tmpMem.booleanMemory.insert(tmpMem.itBool,res);
				//cout << "resultado " << tmpMem.booleanMemory[currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE)] << endl;
				
				break;
				
			/////////////////
			//CONCATENACION//
			/////////////////
			case 12: // :O
				break;
				
			//////////////
			//ASIGNACION//
			//////////////
			case 13: // :D
				//cout << "asignacion " << currentCuadruplo.result << "=" << currentCuadruplo.op1 << endl;
				
				 if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
					 if(currentCuadruplo.op1 >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+3*TEMP_JUNK_SIZE)
						bOp1 = tmpMem.booleanMemory[currentCuadruplo.op1-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
					 if(currentCuadruplo.op1 >= BASE_TEMP+3*TEMP_JUNK_SIZE)
						cOp1 = tmpMem.charMemory[currentCuadruplo.op1-(BASE_TEMP+3*TEMP_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE)
						fOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
					if(currentCuadruplo.op1 >= BASE_CONST+2*CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+3*CONST_JUNK_SIZE)
						bOp1 = constMem.booleanMemory[currentCuadruplo.op1-(BASE_CONST+2*CONST_JUNK_SIZE)];
					if(currentCuadruplo.op1 >= BASE_CONST+3*CONST_JUNK_SIZE)
						cOp1 = constMem.charMemory[currentCuadruplo.op1-(BASE_CONST+3*CONST_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE)
						fOp1 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE)
						bOp1 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
					if(rest >= 3*MEM_JUNK_SIZE && rest < 4*MEM_JUNK_SIZE)
						cOp1 = tmpPtr->charMemory[rest-3*MEM_JUNK_SIZE];
				}
				
				//cout << " valor de fOp1 " << fOp1 << " valor de bOp1 " << bOp1 << endl;
				
				if(currentCuadruplo.result >= BASE_TEMP && currentCuadruplo.result < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.result < BASE_TEMP+TEMP_JUNK_SIZE)
						tmpMem.intMemory[currentCuadruplo.result-BASE_TEMP] = fOp1;
					if(currentCuadruplo.result >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.result < BASE_TEMP+2*TEMP_JUNK_SIZE)
						tmpMem.floatMemory[currentCuadruplo.result-(BASE_TEMP+TEMP_JUNK_SIZE)]  = fOp1;
					 if(currentCuadruplo.result >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.result < BASE_TEMP+3*TEMP_JUNK_SIZE)
						tmpMem.booleanMemory[currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE)] = bOp1;
					 if(currentCuadruplo.result >= BASE_TEMP+3*TEMP_JUNK_SIZE)
						tmpMem.charMemory[currentCuadruplo.result-(BASE_TEMP+3*TEMP_JUNK_SIZE)] = cOp1;
				}
				
				if(currentCuadruplo.result >= BASE_MEM){
					param = (currentCuadruplo.result-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.result-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					//cout << tmpPtr << endl;
					int memorySize;
					if(rest < MEM_JUNK_SIZE){
						if(rest > tmpPtr->intMemory.size()){
							memorySize = tmpPtr->intMemory.size();
							for(tmpPtr->itInt=(tmpPtr->intMemory.begin()+memorySize); tmpPtr->itInt<(tmpPtr->intMemory.begin()+memorySize+rest); tmpPtr->itInt=tmpPtr->intMemory.end())
								tmpPtr->intMemory.insert(tmpPtr->itInt,0);
						}
						tmpPtr->itInt = tmpPtr->intMemory.begin() + rest;
						tmpPtr->intMemory.insert(tmpPtr->itInt,fOp1);
					}
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE){
						//cout << tmpPtr->floatMemory.size() << endl;
						if(rest > tmpPtr->floatMemory.size()){
							memorySize = tmpPtr->floatMemory.size();
							for(tmpPtr->itFloat=(tmpPtr->floatMemory.begin()+memorySize); tmpPtr->itFloat<(tmpPtr->floatMemory.begin()+memorySize+rest-MEM_JUNK_SIZE); tmpPtr->itFloat=tmpPtr->floatMemory.end()){
								tmpPtr->floatMemory.insert(tmpPtr->itFloat,0);
							}
						}
						tmpPtr->itFloat = tmpPtr->floatMemory.begin() + rest-MEM_JUNK_SIZE;
						tmpPtr->floatMemory.insert(tmpPtr->itFloat,fOp1);
					}
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE){
						if(rest > tmpPtr->booleanMemory.size()){
							memorySize = tmpPtr->booleanMemory.size();
							for(tmpPtr->itBool=(tmpPtr->booleanMemory.begin()+memorySize); tmpPtr->itBool<(tmpPtr->booleanMemory.begin()+memorySize+rest-2*MEM_JUNK_SIZE); tmpPtr->itBool=tmpPtr->booleanMemory.end())
								tmpPtr->booleanMemory.insert(tmpPtr->itBool,false);
						}
						tmpPtr->itBool = tmpPtr->booleanMemory.begin() + rest-2*MEM_JUNK_SIZE;
						tmpPtr->booleanMemory.insert(tmpPtr->itBool,bOp1);
					}
					if(rest >= 3*MEM_JUNK_SIZE && rest < 4*MEM_JUNK_SIZE){
						if(rest > tmpPtr->booleanMemory.size()){
							memorySize = tmpPtr->charMemory.size();
							for(tmpPtr->itChar=(tmpPtr->charMemory.begin()+memorySize); tmpPtr->itChar<(tmpPtr->charMemory.begin()+memorySize+rest-3*MEM_JUNK_SIZE); tmpPtr->itChar=tmpPtr->charMemory.end())
								tmpPtr->charMemory.insert(tmpPtr->itChar,0);
						}
						tmpPtr->itChar = tmpPtr->charMemory.begin() + rest-3*MEM_JUNK_SIZE;
						tmpPtr->charMemory.insert(tmpPtr->itChar,cOp1);
					}
				}
				break;
				
			///////
			//NOT//
			///////
			case 14: 
				//cout << "negando a " << currentCuadruplo.op1 << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					 if(currentCuadruplo.op1 >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+3*TEMP_JUNK_SIZE)
						bOp1 = tmpMem.booleanMemory[currentCuadruplo.op1-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op1 >= BASE_CONST+2*CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+3*CONST_JUNK_SIZE)
						bOp1 = constMem.booleanMemory[currentCuadruplo.op1-(BASE_CONST+2*CONST_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE)
						bOp1 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
				}
				
				//cout << "operando 1 " << bOp1 << endl;
				
				tmpMem.itBool = tmpMem.booleanMemory.begin() + currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE);
				tmpMem.booleanMemory.insert(tmpMem.itBool,res);
				//cout << "resultado " << tmpMem.booleanMemory[currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE)] << endl;
				
				break;
				
			/////////
			//MINUS//
			/////////
			case 15:
				//cout << "multiplicando por -1 a " << currentCuadruplo.op1 << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE)
						iOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE)
						iOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE){
						iOp1 = tmpPtr->intMemory[rest];
					}
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
				}
				
				//cout << "operando 1 entero " << iOp1 << endl;
				//cout << "operando 1 flotante " << fOp1 << endl;
				
				if(currentCuadruplo.result < BASE_TEMP+TEMP_JUNK_SIZE){
					tmpMem.itInt = tmpMem.intMemory.begin() + currentCuadruplo.result-BASE_TEMP;
					tmpMem.intMemory.insert(tmpMem.itInt,-iOp1);
					//cout << "resultado " << tmpMem.intMemory[currentCuadruplo.result-BASE_TEMP] << endl;
				}
				if(currentCuadruplo.result >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.result < BASE_TEMP+2*TEMP_JUNK_SIZE){
					tmpMem.itFloat = tmpMem.floatMemory.begin() + currentCuadruplo.result-(BASE_TEMP+TEMP_JUNK_SIZE);
					tmpMem.floatMemory.insert(tmpMem.itFloat,-fOp1);
					//cout << "resultado " << tmpMem.floatMemory[currentCuadruplo.result-(BASE_TEMP+TEMP_JUNK_SIZE)] << endl;
				}
				
				break;
				
			////////
			//GOTO//
			////////
			case 16: 
				//cout << "GOTO a " << currentCuadruplo.result << endl; 
				cuadruploCounter = currentCuadruplo.result;
				currentCuadruplo = cuadruplosVector.getThisCuadruplo(cuadruploCounter);
				gotoFlag = 1;
				break;	
				
			/////////
			//PRINT//
			/////////
			case 17:
				//cout << "PRINT a " << currentCuadruplo.result << endl; 
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE){
						iOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
						active = "int";
					}
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE){
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
						active = "float";
					}
					 if(currentCuadruplo.op1 >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+3*TEMP_JUNK_SIZE){
						bOp1 = tmpMem.booleanMemory[currentCuadruplo.op1-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
						 active = "bool";
					 }
					 if(currentCuadruplo.op1 >= BASE_TEMP+3*TEMP_JUNK_SIZE){
						cOp1 = tmpMem.charMemory[currentCuadruplo.op1-(BASE_TEMP+3*TEMP_JUNK_SIZE)];
						active = "char";
					 }
				}
				 
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE){
						iOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
						active = "int";
					}
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE){
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
						active = "float";
					}
					if(currentCuadruplo.op1 >= BASE_CONST+2*CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+3*CONST_JUNK_SIZE){
						bOp1 = constMem.booleanMemory[currentCuadruplo.op1-(BASE_CONST+2*CONST_JUNK_SIZE)];
						active = "bool";
					}
					if(currentCuadruplo.op1 >= BASE_CONST+3*CONST_JUNK_SIZE){
						cOp1 = constMem.charMemory[currentCuadruplo.op1-(BASE_CONST+3*CONST_JUNK_SIZE)];
						active = "char";
					}
				}
				 
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE){
						iOp1 = tmpPtr->intMemory[rest];
						active = "int";
					}
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE){
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
						active = "float";
					}
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE){
						bOp1 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
						active = "bool";
					}
					if(rest >= 3*MEM_JUNK_SIZE && rest < 4*MEM_JUNK_SIZE){
						cOp1 = tmpPtr->charMemory[rest-3*MEM_JUNK_SIZE];
						active = "char";
					}
				}
				
				if(active == "int"){
					cout << iOp1 << endl;
				}
				if(active == "float"){
					cout << fOp1 << endl;
				}
				if(active == "bool"){
					cout << bOp1 << endl;
				}
				if(active == "char"){
					cout << cOp1 << endl;
				}
				break;
				
			////////
			//READ//
			////////
			case 18: 
				break;
				
			///////////
			//ERA MEM//
			///////////
			case 19:
				//cout << "Nueva memoria para iteracion " << currentCuadruplo.result << "  " << BASE_MEM + currentCuadruplo.result * 4 * MEM_JUNK_SIZE << endl;
				if(currentCuadruplo.result == memoryIndex.size()){
					memory *tmp = new memory::memory();
					itMemIndex = memoryIndex.end();
					memoryIndex.insert(itMemIndex,tmp);
					//cout << "pico1" << endl;
				} else if(currentCuadruplo.result < memoryIndex.size()){
					if(memoryIndex[currentCuadruplo.result] == NULL){
						memory *tmp = new memory::memory();
						memoryIndex[currentCuadruplo.result] = tmp;
						//cout << "pico2" << endl;
					}
					//cout << "pico3" << endl;
				} else {
					itMemIndex = memoryIndex.end();
					//cout << "pico4 " << memoryIndex.size() << " " << currentCuadruplo.result << endl;
					for(int i=memoryIndex.size();i<currentCuadruplo.result;i++){
						memory *tmp = new memory::memory();
						tmp = NULL;
						memoryIndex.insert(itMemIndex,tmp);
						itMemIndex = memoryIndex.end();
						//cout << "pico5" << endl;
					}
					//cout << "pico6" << endl;
					memory *tmp = new memory::memory();
					memoryIndex.insert(itMemIndex,tmp);
					//cout << "pico7" << endl;
				}
				/*
				for(itMemIndex=memoryIndex.begin();itMemIndex<memoryIndex.end();itMemIndex++){
					memory *tmp = new memory::memory();
					tmp = *itMemIndex;
					//cout << "ITERANDO SOBRE INDEX MEMORY " << tmp << endl;
				}
				*/	
				break;	
				
			////////////
			//ERA TEMP//
			////////////
			case 20:
				break;
				
			/////////
			//PARAM//
			/////////
			case 21:
				//cout << "guardando el parametro " << currentCuadruplo.result << "=" << currentCuadruplo.op1 << endl;
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_TEMP+TEMP_JUNK_SIZE)
						fOp1 = tmpMem.intMemory[currentCuadruplo.op1-BASE_TEMP];
					if(currentCuadruplo.op1 >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+2*TEMP_JUNK_SIZE)
						fOp1 = tmpMem.floatMemory[currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE)];
					 if(currentCuadruplo.op1 >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.op1 < BASE_TEMP+3*TEMP_JUNK_SIZE)
						bOp1 = tmpMem.booleanMemory[currentCuadruplo.op1-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
					 if(currentCuadruplo.op1 >= BASE_TEMP+3*TEMP_JUNK_SIZE)
						cOp1 = tmpMem.charMemory[currentCuadruplo.op1-(BASE_TEMP+3*TEMP_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE){
					if(currentCuadruplo.op1 < BASE_CONST+CONST_JUNK_SIZE)
						fOp1 = constMem.intMemory[currentCuadruplo.op1-BASE_CONST];
					if(currentCuadruplo.op1 >= BASE_CONST+CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+2*CONST_JUNK_SIZE)
						fOp1 = constMem.floatMemory[currentCuadruplo.op1-(BASE_CONST+CONST_JUNK_SIZE)];
					if(currentCuadruplo.op1 >= BASE_CONST+2*CONST_JUNK_SIZE && currentCuadruplo.op1 < BASE_CONST+3*CONST_JUNK_SIZE)
						bOp1 = constMem.booleanMemory[currentCuadruplo.op1-(BASE_CONST+2*CONST_JUNK_SIZE)];
					if(currentCuadruplo.op1 >= BASE_CONST+3*CONST_JUNK_SIZE)
						cOp1 = constMem.charMemory[currentCuadruplo.op1-(BASE_CONST+3*CONST_JUNK_SIZE)];
				}
				 
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					if(rest < MEM_JUNK_SIZE)
						fOp1 = tmpPtr->intMemory[rest];
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE)
						fOp1 = tmpPtr->floatMemory[rest-MEM_JUNK_SIZE];
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE)
						bOp1 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
					if(rest >= 3*MEM_JUNK_SIZE && rest < 4*MEM_JUNK_SIZE)
						cOp1 = tmpPtr->charMemory[rest-3*MEM_JUNK_SIZE];
				}
				
				//cout << " valor de fOp1 " << fOp1 << " valor de bOp1 " << bOp1 << endl;
				
				if(currentCuadruplo.result >= BASE_TEMP && currentCuadruplo.result < BASE_TEMP+4*TEMP_JUNK_SIZE){
					if(currentCuadruplo.result < BASE_TEMP+TEMP_JUNK_SIZE)
						tmpMem.intMemory[currentCuadruplo.result-BASE_TEMP] = fOp1;
					if(currentCuadruplo.result >= BASE_TEMP+TEMP_JUNK_SIZE && currentCuadruplo.result < BASE_TEMP+2*TEMP_JUNK_SIZE)
						tmpMem.floatMemory[currentCuadruplo.result-(BASE_TEMP+TEMP_JUNK_SIZE)]  = fOp1;
					 if(currentCuadruplo.result >= BASE_TEMP+2*TEMP_JUNK_SIZE && currentCuadruplo.result < BASE_TEMP+3*TEMP_JUNK_SIZE)
						tmpMem.booleanMemory[currentCuadruplo.result-(BASE_TEMP+2*TEMP_JUNK_SIZE)] = bOp1;
					 if(currentCuadruplo.result >= BASE_TEMP+3*TEMP_JUNK_SIZE)
						tmpMem.charMemory[currentCuadruplo.result-(BASE_TEMP+3*TEMP_JUNK_SIZE)] = cOp1;
				}
				
				if(currentCuadruplo.result >= BASE_MEM){
					param = (currentCuadruplo.result-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.result-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					int memorySize;
					if(rest < MEM_JUNK_SIZE){
						if(rest > tmpPtr->intMemory.size()){
							memorySize = tmpPtr->intMemory.size();
							for(tmpPtr->itInt=(tmpPtr->intMemory.begin()+memorySize); tmpPtr->itInt<(tmpPtr->intMemory.begin()+memorySize+rest); tmpPtr->itInt=tmpPtr->intMemory.end())
								tmpPtr->intMemory.insert(tmpPtr->itInt,0);
						}
						tmpPtr->itInt = tmpPtr->intMemory.begin() + rest;
						tmpPtr->intMemory.insert(tmpPtr->itInt,fOp1);
					}
					if(rest >= MEM_JUNK_SIZE && rest < 2*MEM_JUNK_SIZE){
						if(rest > tmpPtr->floatMemory.size()){
							memorySize = tmpPtr->floatMemory.size();
							for(tmpPtr->itFloat=(tmpPtr->floatMemory.begin()+memorySize); tmpPtr->itFloat<(tmpPtr->floatMemory.begin()+memorySize+rest-MEM_JUNK_SIZE); tmpPtr->itFloat=tmpPtr->floatMemory.end())
								tmpPtr->floatMemory.insert(tmpPtr->itFloat,0);
						}
						tmpPtr->itFloat = tmpPtr->floatMemory.begin() + rest-MEM_JUNK_SIZE;
						tmpPtr->floatMemory.insert(tmpPtr->itFloat,fOp1);
					}
					if(rest >= 2*MEM_JUNK_SIZE && rest < 3*MEM_JUNK_SIZE){
						if(rest > tmpPtr->booleanMemory.size()){
							memorySize = tmpPtr->booleanMemory.size();
							for(tmpPtr->itBool=(tmpPtr->booleanMemory.begin()+memorySize); tmpPtr->itBool<(tmpPtr->booleanMemory.begin()+memorySize+rest-2*MEM_JUNK_SIZE); tmpPtr->itBool=tmpPtr->booleanMemory.end())
								tmpPtr->booleanMemory.insert(tmpPtr->itBool,false);
						}
						tmpPtr->itBool = tmpPtr->booleanMemory.begin() + rest-2*MEM_JUNK_SIZE;
						tmpPtr->booleanMemory.insert(tmpPtr->itBool,bOp1);
					}
					if(rest >= 3*MEM_JUNK_SIZE && rest < 4*MEM_JUNK_SIZE){
						if(rest > tmpPtr->booleanMemory.size()){
							memorySize = tmpPtr->charMemory.size();
							for(tmpPtr->itChar=(tmpPtr->charMemory.begin()+memorySize); tmpPtr->itChar<(tmpPtr->charMemory.begin()+memorySize+rest-3*MEM_JUNK_SIZE); tmpPtr->itChar=tmpPtr->charMemory.end())
								tmpPtr->charMemory.insert(tmpPtr->itChar,0);
						}
						tmpPtr->itChar = tmpPtr->charMemory.begin() + rest-3*MEM_JUNK_SIZE;
						tmpPtr->charMemory.insert(tmpPtr->itChar,cOp1);
					}
				}
				break;
				

			/////////
			//GOSUB//
			/////////
			case 23:
				//cout << "guardando numero de cuadruplo de regreso " << cuadruploCounter+1 << endl;
				jumpBack.push(cuadruploCounter+1);
				//cout << "GOSUB a " << currentCuadruplo.result << endl; 
				cuadruploCounter = currentCuadruplo.result;
				currentCuadruplo = cuadruplosVector.getThisCuadruplo(cuadruploCounter);
				gotoFlag = 1;
				break;
				
			///////
			//RTN//
			///////
			case 24:
				cuadruploCounter = jumpBack.topEL();
				//cout << cuadruploCounter << endl; 
				jumpBack.pop();
				//cout << "RTN al cuadruplo " << cuadruploCounter << endl;
				currentCuadruplo = cuadruplosVector.getThisCuadruplo(cuadruploCounter);
				gotoFlag = 1;
				break;	
			
			////////////
			//READ_INT//
			////////////
			case 25:
				int intToSave;
				cin >> intToSave;
				tmpMem.itInt = tmpMem.intMemory.begin() + currentCuadruplo.op1-BASE_TEMP;
				tmpMem.intMemory.insert(tmpMem.itInt,intToSave);
				break;
				
			//////////////
			//READ_FLOAT//
			//////////////
			case 26: 
				float floatToSave;
				cin >> floatToSave;
				tmpMem.itFloat = tmpMem.floatMemory.begin() + currentCuadruplo.op1-(BASE_TEMP+TEMP_JUNK_SIZE);
				tmpMem.floatMemory.insert(tmpMem.itFloat,floatToSave);
				break;	
				
			//////////////
			//GOTO FALSO//
			//////////////
			case 27:
				//cout << "GOTO_FALSO de " << currentCuadruplo.op1 << " a " << currentCuadruplo.result << endl;
				
				if(currentCuadruplo.op1 >= BASE_TEMP && currentCuadruplo.op1 < BASE_TEMP+4*TEMP_JUNK_SIZE)
					bOp1 = tmpMem.booleanMemory[currentCuadruplo.op1-(BASE_TEMP+2*TEMP_JUNK_SIZE)];
				if(currentCuadruplo.op1 >= BASE_CONST && currentCuadruplo.op1 < BASE_CONST+4*CONST_JUNK_SIZE)
					bOp1 = constMem.booleanMemory[currentCuadruplo.op1-(BASE_CONST+2*CONST_JUNK_SIZE)]; 
				if(currentCuadruplo.op1 >= BASE_MEM){
					param = (currentCuadruplo.op1-BASE_MEM)/(4*MEM_JUNK_SIZE);
					fractpart = modf (param , &intpart);
					rest = fmod(currentCuadruplo.op1-BASE_MEM,4*MEM_JUNK_SIZE);
					tmpPtr = memoryIndex[intpart];
					bOp1 = tmpPtr->booleanMemory[rest-2*MEM_JUNK_SIZE];
				}
				
				//cout << "operando 1 " << bOp1 << endl;
				
				if(!bOp1){
					//cout << "Ejecutando el GOTO_FALSO" << endl;
					cuadruploCounter = currentCuadruplo.result;
					currentCuadruplo = cuadruplosVector.getThisCuadruplo(cuadruploCounter);
					gotoFlag = 1;
				}
				break;	
				
			/////////////
			//READ_BOOL//
			/////////////
			case 28: 
				bool boolToSave;
				cin >> boolToSave;
				tmpMem.itBool = tmpMem.booleanMemory.begin() + currentCuadruplo.op1-(BASE_TEMP+2*TEMP_JUNK_SIZE);
				tmpMem.booleanMemory.insert(tmpMem.itBool,boolToSave);
				break;
				
			/////////////
			//READ_CHAR//
			/////////////
			case 29: 
				char charToSave;
				cin >> charToSave;
				tmpMem.itChar = tmpMem.charMemory.begin() + currentCuadruplo.op1-(BASE_TEMP+3*TEMP_JUNK_SIZE);
				tmpMem.charMemory.insert(tmpMem.itChar,charToSave);
				break;	
				
			////////
			//READ//
			////////
			case 30: 
				string stringToSave;
				cin >> stringToSave;
				//cout << stringToSave;
				break;	
		}
		
		if(!gotoFlag){
			cuadruploCounter++;
			currentCuadruplo = cuadruplosVector.getThisCuadruplo(cuadruploCounter); 
			gotoFlag = 0;
		}
	}
	return 0;
}

